<div class="hbox hbox-auto-xs hbox-auto-sm">
    <div class="col">
        <div>
            <div class="wrapper-lg bg-white-opacity">
                <div class="row m-t">
                    <div class="col-sm-7">
                        <a href class="thumb-lg pull-left m-r">
                            <img ng-src="{{app.user.HeadImageUrl}}" class="img-circle">
                        </a>
                        <div class="clear m-b">
                            <div class="m-b m-t-sm">
                                <span class="h3 text-black">{{app.user.Nickname}}</span>
                            </div>
                            <span class="btn btn-sm btn-success btn-rounded" ng-repeat="r in app.user.Roles">{{r}}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="wrapper bg-white b-b" ng-controller="ProfileCtrl">
            <tabset class="nav-tabs-alt" justified="true">
                <tab>
                    <tab-heading>
                        账户信息
                    </tab-heading>
                    <div class="wrapper-md">
                        <div class="row">
                            <div class="col-sm-6">
                                <form class="form-validation form-inline m" name="f_n_name_1001" ng-submit="updateName()">
                                    <div class="form-group form-group-sm">
                                        <label class="control-label" for="p_n_name_1000">昵称：</label>
                                        <input class="form-control" ng-model="form.newName" id="p_n_name_1000" placeholder="新的昵称" required="" ng-pattern="/^[^&\<\>\\/\*\$\&\|\~\!\?\[\]]+$/" />
                                        <button type="submit" class="btn w-xs btn-primary" ng-disabled="f_n_name_1001.$invalid">更新</button>
                                    </div>
                                </form>
                                <div class="line line-dashed b-b line-lg pull-in"></div>
                                <div class="m form-inline">
                                    <label class="control-label">Email：</label>
                                    <input class="form-control" value="{{app.user.Email}}" disabled="disabled"/>
                                    <button type="button" class="btn w-xs  btn-default" ng-click="showEmailInput=!showEmailInput;">{{showEmailInput?'完成':user.Email?'修改':'添加'}}</button>
                                </div>
                                <form class="form-validation form-inline m" name="f_n_email_1001" ng-submit="updateEmail()" ng-show="showEmailInput">
                                    <div class="form-group form-group-sm">
                                        <label class="control-label" for="p_n_email_1000"></label>
                                        <input class="form-control" ng-model="form.newEmail" id="p_n_email_1000" placeholder="新的Email" ng-disabled="!verify.enable" required="" type="email" />
                                        <button type="button" class="btn w-xs  btn-danger" ng-click="verifyEmail()" ng-disabled="!verify.enable">{{verify.text}}</button>
                                        <input class="form-control" ng-model="form.emailCode" placeholder="Email验证码" required="" ng-minlength="4" type="text" />
                                        <button type="submit" class="btn w-xs  btn-primary" ng-disabled="f_n_email_1001.$invalid">提交</button>
                                     </div>
                                </form>
                                <div class="line line-dashed b-b line-lg pull-in"></div>
                                <div class="m form-inline">
                                    <label class="control-label">手机号：</label> {{app.user.Phone}}
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <form role="form" name="f_1003" ng-submit="updateHead()">
                                    <div class="form-group  m">
                                        <input ui-jq="filestyle" type="file" ui-options="{'buttonText':'选择头像'}" accept="image/*" ng-file-model="form.head" required="">
                                    </div>
                                    <div class="line line-dashed b-b line-lg"></div>
                                    <p>提示：</p>
                                    <ol>
                                        <li>图片文件大小不能超过1M，仅支持：jpg、png、gif;</li>
                                        <li>头像必须是正方形。</li>
                                    </ol>
                                    <div>
                                        <img ng-src="{{form.head.data || user.HeadImageUrl}}" id="head-img-preview" class="avatar m w-sm" alt="头像预览" />
                                        <p>
                                            <button class="btn w-xs btn-primary">更新头像</button>
                                        </p>
                                    </div>
                                </form>
                            </div>
                        </div>
                       
                    </div>
                </tab>
                <tab>
                    <tab-heading>
                        账户安全
                    </tab-heading>
                    <div class="wrapper-md">
                        <form class="form-horizontal" role="form" ng-submit="changePwd()" name="f_1002">
                            <div class="form-group form-group-sm">
                                <label class="control-label col-md-1 col-sm-2">原密码</label>
                                <div class="col-md-2 col-sm-4">
                                    <input class="form-control" ng-model="form.oldPwd" required="" type="password" ng-minlength="6" />
                                </div>
                            </div>
                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group form-group-sm">
                                <label class="control-label col-md-1 col-sm">新密码</label>
                                <div class="col-md-2 col-sm-4">
                                    <input class="form-control" ng-model="form.newPwd" required="" type="password" ng-minlength="6" />
                                </div>
                            </div>
                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group form-group-sm">
                                <label class="control-label col-md-1 col-sm">密码确认</label>
                                <div class="col-md-2 col-sm-4">
                                    <input class="form-control" ng-model="form.newPwd2" required="" type="password" ng-minlength="6" />
                                </div>
                            </div>
                            <div class="line line-dashed b-b line-lg pull-in"></div>
                            <div class="form-group">
                                <div class="col-md-offset-1 col-sm-offset-2 padder">
                                    <input type="submit" value="提交" class="btn btn-primary btn-sm" ng-disabled="f_1002.$invalid" />
                                </div>
                            </div>
                        </form>
                    </div>
                </tab>
            </tabset>
        </div>
    </div>
</div>